<template>
  <div class="detial">
    <van-nav-bar title="广告详情" left-text="返回" left-arrow @click-left="onClickLeft" fixed />
    <div class="content1">
      <img :src="this.$route.params.url" alt />
      <br />

      <div class="title">
        <span class="titles">标题</span>
        {{this.$route.params.title}}
      </div>

      <!-- 广告内容 -->
      <div class="content">
        <span class="titles">内容</span>
        {{this.$route.params.con}}
      </div>
    </div>
  </div>
</template>
<script>
export default {
  mounted: function() {
    this.points();
  },

  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    points() {
      let paramForm = {
        points: this.$route.params.points,
        id: this.$route.params.id
      };
      this.$axios
        .put("prod-api/app/advertisement/points", paramForm)
        .then(res => {
          if (200 == res.data.code) {
            this.$toast.fail(res.data.msg);
          } else {
            this.$toast.fail(res.data.msg);
          }
        });
    }
  }
};
</script>
<style lang="scss" scoped>
.content1 {
  padding-top: 50px;
}
.van-nav-bar {
  background: url("../assets/bg2.png");
}
.title {
  width: 90%;
  min-height: 10px;
  height: auto !important;
  background: white;
  margin: 10px;
  border-radius: 10px;
  padding: 10px;
  text-indent: 25px;
}
.titles {
  position: relative;
  left: -10px;
  font-weight: bold;
}
.content {
  width: 90%;
  min-height: 150px;
  height: auto !important;
  background: white;
  margin: 10px;
  border-radius: 10px;
  padding: 10px;
  text-indent: 25px;
}
.huany {
  text-align: center;
  margin-left: 32%;
  color: blue;
  font-size: 20px;
}
.cm {
  color: cadetblue;
}
img {
  width: 100%;
  height: 200px;
}
</style>